<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ attribute name="logs" required="true" type="java.util.List" %>
<%@ attribute name="pages" required="true" type="java.lang.Integer" %>
<%@ attribute name="page" required="true" type="java.lang.Integer" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="${language}"/>
<fmt:bundle basename="messages" prefix="logs.">
    <div class="table-responsive">
        <table class="table table-striped">
            <thead>
            <tr>
                <th><fmt:message key="date"/></th>
                <th><fmt:message key="logger"/></th>
                <th><fmt:message key="level"/></th>
                <th><fmt:message key="message"/></th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${logs}" var="log">
                <tr>
                    <td>${log.date}</td>
                    <td>${log.logger}</td>
                    <td>${log.level}</td>
                    <td>${log.message}</td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
    ${pages}

    <c:forEach var='i' begin='1' end="${pages}">
    <a href="/maa/do?action=show-log?page=${i}">i </a>
    </c:forEach>

</fmt:bundle>